package com.hzit.config;

import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.aop.interceptor.PerformanceMonitorInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * 配置类
 */
@Configuration
public class MyBatisConfig {

    /**
     * 乐观锁插件
     * @return
     */
/*
    @Bean
    public OptimisticLockerInterceptor optimisticLockerInterceptor(){
        return new OptimisticLockerInterceptor();
    }
*/

    /**
     * 逻辑删除插件
     */
/*    @Bean
    public ISqlInjector sqlInjector(){
        return new LogicSqlInjector();
    }*/

    /**
     * 分页的插件
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor(){
            return new PaginationInterceptor();
        }

}
